package com.antd.common.log.fegin.fallback;

import com.antd.admin.api.entity.SysLog;
import com.antd.common.core.util.R;
import com.antd.common.log.fegin.RemoteLogService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * TODO
 *
 * @author 子丶沫
 * @version 1.0
 * @date 2020/11/18 17:58
 */
@AllArgsConstructor
@Slf4j
public class RemoteLogFallBackImpl implements RemoteLogService {
    private final Throwable throwable;
    @Override
    public R<Object> saveLog(SysLog sysLog) {
        log.error("feign 保存日志失败:{}", sysLog, throwable);
        return R.error("feign 保存日志失败");
    }
}
